package com.nercel.dsj.gksales.dao.mapper;

import com.nercel.dsj.gksales.model.entity.Configuration;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ConfigurationMapper {

    List<Configuration> getConfigurations(@Param(value = "name") String name, @Param(value = "type") String type);

    Configuration getConfigurationById(@Param(value = "id") int id);

    Configuration getConfigurationByName(@Param(value = "name") String name);

    Configuration getConfigurationByLast();

    boolean saveConfiguration(Configuration configuration);

    boolean updateConfiguration(Configuration configuration);

    boolean deleteConfiguration(@Param(value = "id") int id);
}